package com.klm.common.config;

import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

@Configuration
@ComponentScan(basePackages = {"com.klm"})
@EnableConfigurationProperties(LsCoreProperties.class)//你需要注入的Bean所在的包,是个数组可以多个
public class LsCoreConfig {

    private final LsCoreProperties properties;

    public LsCoreConfig(LsCoreProperties properties) {
        this.properties = properties;
    }

    @Bean
    public String languageDataBaseKey(){
        return properties.getBase().language().database().getKey();
    }

}


